﻿using System;
using System.Runtime.Serialization;

/// <summary>
/// The Common namespace.
/// </summary>
namespace WebChatApi.Common
{
    /// <summary>
    /// Class ThirdPartyNameValueCriteria. It is a common criteria, which is used for querying for object which is inherited from <see cref="ThirdPartyKeyNameItem" /> type.
    /// </summary>
    [DataContract]
    public class ThirdPartyNameValueCriteria
    {
        /// <summary>
        /// Gets the key.
        /// </summary>
        /// <value>The key.</value>
        [DataMember]
        public Guid? Key
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the third party identity.
        /// When doing query, value of <c>ThirdPartyIdentity</c> would be applied "Equals" for <c>ThirdPartyIdentity</c>.
        /// </summary>
        /// <value>The code.</value>
        [DataMember]
        public string ThirdPartyIdentity
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the keywords.
        /// When doing query, value of <c>Keywords</c> would be both applied for <c>ThirdPartyIdentity</c> and <c>Name</c>.
        /// For example:
        /// <example>
        /// ThirdPartyNameValueCriteria criteria = new ThirdPartyNameValueCriteria();
        /// criteria.Keywords = "A";
        /// </example>
        /// If you only want to get object by code, keep <c>Keywords</c> null or empty and fill value in <c>ThirdPartyIdentity</c>.
        /// </summary>
        /// <value>The keywords.</value>
        [DataMember]
        public string Keyword
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the culture info.
        /// When doing query, value of <c>CultureInfo</c> would be applied "Equals" for <c>CultureInfo</c>, ignoring case.'
        /// If keep it as null or empty, the query would return objects in all language.
        /// </summary>
        /// <value>The culture info.</value>
        [DataMember]
        public string CultureInfo
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the count.
        /// When doing query, value of <c>Count</c> would be applied for limit result count.
        /// If this count &lt; 0, system would apply a default value, which may be different in different access controller and stored procedures.
        /// </summary>
        /// <value>The count.</value>
        [DataMember]
        public int Count
        {
            get;
            set;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ThirdPartyNameValueCriteria" /> class.
        /// </summary>
        public ThirdPartyNameValueCriteria()
        {
        }
    }
}
